perform operations on vectors in two-space and three-space